package com.itheima.service;

import com.itheima.domain.Question;
import org.apache.ibatis.annotations.Param;
import org.springframework.transaction.annotation.Transactional;

import javax.servlet.http.HttpSession;
import java.util.List;

@Transactional
public interface QuestionService {

    public void save(Question question, HttpSession session);

    public Boolean update(Question question);


    public Boolean delete(Integer qid);


    public Question getById(Integer qid);


    public List<Question> getAll();

    /*
    获取总页数
     */
    Integer getTotalPage(Integer pageCount,String title);

     /*
    获取所有帖子集合
     */
    List<Question> getAllByPage(Integer currentPage,Integer pageCount,String title);

    List<Question> getAllQues(String title);

    Boolean updateStatus(int is_up, int qid);

    List<Question> getAllUp();
    List<Question> getByUid(Integer uid);

}
